package com.cf.domain.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cf.utils.DateUtil;
import lombok.Data;

import java.util.Date;

@Data
@TableName("t_certificate")
public class Certificate {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    //大赛名称
    private String competition;

    //项目名称
    @TableField("project_name")
    private String projectName;

    //团队名称
    @TableField("team_name")
    private String teamName;

    //团队成员姓名，以‘，’号隔开
    private String names;

    //奖项: 一等奖；二等奖；三等奖
    private String prize;

    //证书扫描件
    private String images;

    //发证时间
    @TableField("start_time")
    private Date startTime;

    //创建时间
    @TableField("create_time")
    private Date createTime;

    public String getStartTimeName(){
        return DateUtil.date2Str(this.startTime, DateUtil.YYYYMMDD);
    }

}
